//
//  CreateReviewTask.m
//  ZooNgonDoiOS
//
//  Created by Anh Jun Linh Tinh on 6/26/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "CreateReviewTask.h"

@implementation CreateReviewTask

-(id)initWithContent:(NSString *)content spotId:(NSString *)spotId{
    self = [super init];
    if(self){
        _content = content;
        _spotId = spotId;
    }
    return self;
}

-(void)doExecute{
    _spotId = @"4f95350533929a9b0f000000";
    NSDictionary *params = [NSDictionary dictionaryWithKeysAndObjects:@"spot_id",_spotId,@"content",_content,nil];
    [[RKObjectManager sharedManager].client put:@"/review" params:params delegate:self];
}

-(void)request:(RKRequest *)request didFailLoadWithError:(NSError *)error{
    NSLog(@"cde %@",[request.response bodyAsString]);
}
-(void)request:(RKRequest *)request didLoadResponse:(RKResponse *)response{
    NSLog(@"xxxxxxxxxxx %@",[response bodyAsString]);
}


@end
